<?php
	include('../inc/config.php');

	
	if( !isset($_SESSION['login']) or $_SESSION['login']<1 ) {	die('Hacking attempt...!!!'); }
	
	
	$producto_id  = request('producto_id',0);
	
	$accion       = request('accion','');
	
	if($accion=='Guardar'){
		$data = $_POST['data'];
		$ok = $db->Replace('productos', $data,'id', $autoquote = true); 	
		include(ROOT.'/html/_javascript_css.html.php'); 
		echo"<h3>Datos actualizados correctamente</h3>";
		echo "<br><br><a href='javascript:self.close();' class='btn btn-success btn-large'>Cerrar Ventana</a>";
		die();
	}


	$sql = "select id,tarifas from productos where id='$producto_id'";
	$rs  = $db->SelectLimit($sql,1);
	$data = $rs->FetchRow();
	
	if(!$data) {die('Hacking attempt...!!!');}

	
?>
<?php include(ROOT.'/html/_javascript_css.html.php'); ?>
<script type="text/javascript" src="<?php echo URL;?>/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo URL;?>/account/mi-tinymce.js"></script>

<style>
#tabla-tarifas td{
	line-height:30px;
	font-weight:bold;
	font-size:12px;
}
</style>
	<h3>Notas de Tarifas: PRIVADAS</h3>
	
	<form action='<?php echo URL;?>/mensajeria/actualizar-tarifas-privadas.php' method='post' >
		
		<textarea rows='5' class='input-xlarge' name='data[tarifas]' id='tarifas_privadas'><?php echo $data['tarifas'];?></textarea>
		
		<input type='hidden' name='data[id]' value='<?php echo $data['id'];?>'>
		<input type='hidden' name='accion' value='Guardar'>
		<input type='submit' class='btn btn-primary' value='Guardar Cambios'>
	</form>	
